package GenericDemo;

import java.util.ArrayList;
import java.util.List;

public class Main {

    public static void main(String[] args) {

        //比较String
        String string1 = "Fire and Blood";
        String string2 = "Winter is coming";
        ResponseVO responseVO = new ResponseVO(string1, string2);

        System.out.println("string1:" + string1 + "\t" + "string2:" + string2);
        System.out.println(responseVO.toString());
        System.out.println("--------------------------------------");

        //比较int
        int a = 2;
        int b = 3;
        ResponseVO responseVO1 = new ResponseVO(a, b);
        System.out.println("a=" + a + "\t" + "b=" + b);
        System.out.println(responseVO1.toString());
        System.out.println("--------------------------------------");



        //list<Integer>
        List<Integer> list = new ArrayList<>();
        list.add(10);
        list.add(20);
        ResponseVO responseVO2 = new ResponseVO(list.get(0), list.get(1));
        System.out.println("list[0]:" + list.get(0) + ",list[1]:" + list.get(1));
        System.out.println(responseVO2.toString());
        System.out.println("--------------------------------------");

        //list<String>
        List<String> list1 = new ArrayList<>();
        list1.add("Hear Me Roar!");
        list1.add("Growing Strong");
        ResponseVO responseVO3 = new ResponseVO(list1.get(0), list1.get(1));
        System.out.println("list[0]:" + list1.get(0) + ",list[1]:" + list1.get(1));
        System.out.println(responseVO3.toString());
        System.out.println("--------------------------------------");

    }
}